<?php   @session_start();
require_once("includes/adminclass.php");
$admin = new ADMIN;
$data = @$_POST["data"];
$data = $admin->addHTML($data);
$page = @$_REQUEST["page"];
$option = @$_REQUEST["option"];
switch($page) {
      case 'admin':
            switch($option) {
                  case 'saveMyAccount':                        
                        echo $result = $admin->saveMyAccount($login_id,$data);                        
                  break; 
                  case 'adminSignIn':
                        echo $result = $admin -> adminSignIn($data);
                  break;
				  case 'saveWhat':                        
                        echo $result = $admin->saveWhat($data);                        
                  break;
				  case 'saveConnect':                        
                        echo $result = $admin->saveConnect($data);                        
                  break;
				  case 'getPassword':
                        echo $result = $admin -> getPassword($data);
                  break;                                    
                  case 'saveConfiguration':
                        echo $result = $admin -> saveConfiguration($data);
                  break;                                   
            }
      break; 
	  case 'action':
            switch($option){
                  case 'enable':                        
                        $result=$admin->enable($data);                        
                  break;
                  case 'feature':                        
                      echo  $result=$admin->feature($data);                        
                  break;
                  case 'del':
                        $result=$admin->del($data);
                  break;
				  case 'delBanner':
                        $result=$admin->delBanner($data);
                  break;
				  case 'setSession':
                        $data = explode("~",$data);
                        $key = explode("`",$data[0]);
                        $value = explode("`",$data[1]);
                        $arr = array_combine($key,$value);
                        $_SESSION["setSession"] = $arr;
                  break;
      		case 'setSessionId':                       
                        $_SESSION["ses_id"] = $data;                        
      			echo 1;
                  break;  
                  case 'setSessionOrder':               
                        $data = explode("-",$data);        
                        $_SESSION["ses_id"] = $data[0];
                        $_SESSION["order_id"] = $data[1];
      			echo 1;
                  break;                      
            }
      break;     
      case 'keyword':
            switch($option) {                  
                  case 'saveKeyword':
                        echo $result = $admin -> saveKeyword($data);
                  break;
                  case 'filter':
                        $data=explode("`",$data);
                        $indx = $data[0];
                        $ser_field=$data[1];
                        $ser_type=$data[2];
                        $filter=$data[3];
                        $list_length = $data[4];
                        $ser_status = $data[5];                        
                        $result=$admin->keywordList($indx,$filter,$ser_field,$ser_type,$list_length,$ser_status);
                        echo $result;
                  break;           
            }
      break;
      case 'content':
            switch($option){
                  case 'saveContent':                         
                        $result=$admin->saveContent($data);
                        echo $result;
                  break;
                  case 'filter':
                        $data=explode("`",$data);
                        $indx = $data[0];
                        $ser_field = $data[1];
                        $ser_type = $data[2];
                        $filter = $data[3];                        
                        $list_length = $data[4];
                        $ser_display_in = $data[5];
                        $ser_status = $data[6];
                        $result = $admin->contentList($indx,$filter,$ser_display_in,$ser_field,$ser_type,$list_length,$ser_status);
                        echo $result;
                  break;
            }
      break;
	  
	  case 'album':
		  switch($option){                 
				case 'saveAlbum':                         
                        $result=$admin->saveAlbum($data);
                        echo $result;
                break;
				case 'filter':
                        $data=explode("`",$data);
                        $indx = $data[0];
                        $ser_field = $data[1];
                        $ser_type = $data[2];
                        $filter = $data[3];                        
                        $list_length = $data[4];
						$ser_status = $data[5];
                        $result = $admin -> albumList($indx,$filter,$ser_field,$ser_type,$list_length,$ser_status);
                      echo $result;
                  break;
		  }
      break;
	  case 'saveGallery':
			$result=$admin->saveGallery($data);
			echo $result;
      break;
}
?>